import React from "react"


const Home =React.lazy(()=>import ('../pages/Home'))
const Detail =React.lazy(()=>import ('../pages/Detail'))
const Login =React.lazy(()=>import ('../pages/Login'))

const Analysis =React.lazy(()=>import ('../pages/Home/Analysis'))
const Business =React.lazy(()=>import ('../pages/Home/Business'))
const Customers =React.lazy(()=>import ('../pages/Home/Customers'))
const Main =React.lazy(()=>import ('../pages/Home/Main'))
const Management =React.lazy(()=>import ('../pages/Home/Management'))
const Organizational =React.lazy(()=>import ('../pages/Home/Organizational'))
const Policy =React.lazy(()=>import ('../pages/Home/Policy'))
const Record =React.lazy(()=>import ('../pages/Home/Record'))
const System =React.lazy(()=>import ('../pages/Home/System-management'))

export const  childRouter=[
    {
        path:'/home/main',
        name:'系统首页',
        element:<Main/>,
    },{
        path:'/home/Management',
        name:'招商管理',
        element:<Management/>,
    },{
        path:'/home/policy',
        name:'招商政策',
        element:<Policy/>,
    },{
        path:'/home/organizational',
        name:'组织架构',
        element:<Organizational/>,
    },{
        path:'/home/customers',
        name:'企业咨询',
        element:<Customers/>,
    },{
        path:'/home/record',
        name:'会议记录',
        element:<Record/>,
    },{
        path:'/home/business',
        name:'潜在客户',
        element:<Business/>,
    },{
        path:'/home/analysis',
        name:'客户分析',
        element:<Analysis/>,
    },{
        path:'/home/system',
        name:'系统管理',
        element:<System/>,
    },
]


const routes=[{
    path:'/home',
    name:'主页',
    element:<Home/>,
    children:childRouter
},{
    path:'/detail',
    name:'详情',
    element:<Detail/>
},{
    path:'/login',
    name:'登录',
    element:<Login/>
},{
    from:'/',
    to:'/home/main'
}]

export default routes